package com.ipfsemc.ipfsemc.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "Order", description = "订单")
public class Order {
    @ApiModelProperty(notes = "ID", readOnly = true)
    private String orderId;

    @ApiModelProperty(notes = "产品ID,",required = true)
    private String proId;
    
    @ApiModelProperty(notes = "订单总费用", required = true)
    private BigDecimal orderPrice;

    @ApiModelProperty(notes = "订单规格  单位T", example = "1", required = true)
    private Integer orderSpecs;

    @ApiModelProperty(notes = "订单类型：1为年  2 为6月租  3买断  4 服务费  5 续费", example = "1", required = true)
    private Integer orderType;

    @ApiModelProperty(notes = "订单购买时产生的升力值", example = "20", required = true)
    private Integer orderUp;

    @ApiModelProperty(notes = "下单时间", readOnly = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(notes = "付款时间", readOnly = true)
    private Date payTime;



    @ApiModelProperty(notes = "用户ID", required = true)
    private String userId;

    @ApiModelProperty(example = "-1", notes = "状态  -1待付款，0已付款(微信付款)，1线下付款", required = true)
    private Integer orderState;

    @ApiModelProperty(example = "2", notes = "时长   单位年")
    private Integer duration;

    @ApiModelProperty(notes = "数量", example = "1T/2年", readOnly = true)
    private String proNum;

    @ApiModelProperty(notes = "订单购买的空间", readOnly = true)
    private Integer orderSpace;



}